package com.sise.wangzhan.controller;

import com.sise.wangzhan.entity.Book;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Classname BookController
 * @Description TODO
 * @Date 2020/5/14 11:04
 * @Created by wangzhan
 */
@RestController
public class BookController {

    @RequestMapping(value = "/book/{bookId}", method = RequestMethod.GET,
                    produces = MediaType.APPLICATION_JSON_VALUE)
    public Book findBook(@PathVariable Integer bookId){
        Book book = new Book(bookId,"微服务","Tommy");

        return book;
    }

}
